package com.dtda.edu.miaosha.bo;
/**
 * @author 袁强
 * @version 2019年2月18日 上午9:47:19
 * 类说明  
 */

import java.math.BigDecimal;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

public class ItemBo {

	private Integer id;
	
	//商品名称
	@NotBlank(message="商品名称不能为空")
	private String title;
	
	//商品价格
	@NotNull(message="商品价格不能为空")
	@Min(value=0,message="商品价格必须大于0")
	private BigDecimal price;
	
	//商品库存
	@NotNull(message="库存必须填")
	private Integer stock;
	
	//商品描述
	@NotBlank(message="商品描述不能为空")
	private String description;
	
	//商品销量
	private Integer sales;  //非必填入参
	
	//商品图片描述的url
	@NotBlank(message="商品图片不能为空")
	private String imgUrl;

	//聚合模型:marketBo !=null , 表示该商品还有秒杀活动(未开始或正在进行)
	private MarketBo marketBo;
	
	public MarketBo getMarketBo() {
		return marketBo;
	}

	public void setMarketBo(MarketBo marketBo) {
		this.marketBo = marketBo;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getSales() {
		return sales;
	}

	public void setSales(Integer sales) {
		this.sales = sales;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}
	
	
}
